package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchInstantaneousFlowAverageReportsMapper;
import com.ruoyi.system.domain.DispatchInstantaneousFlowAverageReports;
import com.ruoyi.system.service.IDispatchInstantaneousFlowAverageReportsService;

/**
 * 瞬时流量均值报Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchInstantaneousFlowAverageReportsServiceImpl implements IDispatchInstantaneousFlowAverageReportsService 
{
    @Autowired
    private DispatchInstantaneousFlowAverageReportsMapper dispatchInstantaneousFlowAverageReportsMapper;

    /**
     * 查询瞬时流量均值报
     * 
     * @param instantaneousFlowAverageReportsId 瞬时流量均值报主键
     * @return 瞬时流量均值报
     */
    @Override
    public DispatchInstantaneousFlowAverageReports selectDispatchInstantaneousFlowAverageReportsByInstantaneousFlowAverageReportsId(Long instantaneousFlowAverageReportsId)
    {
        return dispatchInstantaneousFlowAverageReportsMapper.selectDispatchInstantaneousFlowAverageReportsByInstantaneousFlowAverageReportsId(instantaneousFlowAverageReportsId);
    }

    /**
     * 查询瞬时流量均值报列表
     * 
     * @param dispatchInstantaneousFlowAverageReports 瞬时流量均值报
     * @return 瞬时流量均值报
     */
    @Override
    public List<DispatchInstantaneousFlowAverageReports> selectDispatchInstantaneousFlowAverageReportsList(DispatchInstantaneousFlowAverageReports dispatchInstantaneousFlowAverageReports)
    {
        return dispatchInstantaneousFlowAverageReportsMapper.selectDispatchInstantaneousFlowAverageReportsList(dispatchInstantaneousFlowAverageReports);
    }

    /**
     * 新增瞬时流量均值报
     * 
     * @param dispatchInstantaneousFlowAverageReports 瞬时流量均值报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchInstantaneousFlowAverageReports(DispatchInstantaneousFlowAverageReports dispatchInstantaneousFlowAverageReports)
    {
        return dispatchInstantaneousFlowAverageReportsMapper.insertDispatchInstantaneousFlowAverageReports(dispatchInstantaneousFlowAverageReports);
    }

    /**
     * 修改瞬时流量均值报
     * 
     * @param dispatchInstantaneousFlowAverageReports 瞬时流量均值报
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchInstantaneousFlowAverageReports(DispatchInstantaneousFlowAverageReports dispatchInstantaneousFlowAverageReports)
    {
        dispatchInstantaneousFlowAverageReports.setUpdateTime(DateUtils.getNowDate());
        return dispatchInstantaneousFlowAverageReportsMapper.updateDispatchInstantaneousFlowAverageReports(dispatchInstantaneousFlowAverageReports);
    }

    /**
     * 批量删除瞬时流量均值报
     * 
     * @param instantaneousFlowAverageReportsIds 需要删除的瞬时流量均值报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchInstantaneousFlowAverageReportsByInstantaneousFlowAverageReportsIds(Long[] instantaneousFlowAverageReportsIds)
    {
        return dispatchInstantaneousFlowAverageReportsMapper.deleteDispatchInstantaneousFlowAverageReportsByInstantaneousFlowAverageReportsIds(instantaneousFlowAverageReportsIds);
    }

    /**
     * 删除瞬时流量均值报信息
     * 
     * @param instantaneousFlowAverageReportsId 瞬时流量均值报主键
     * @return 结果
     */
    @Override
    public int deleteDispatchInstantaneousFlowAverageReportsByInstantaneousFlowAverageReportsId(Long instantaneousFlowAverageReportsId)
    {
        return dispatchInstantaneousFlowAverageReportsMapper.deleteDispatchInstantaneousFlowAverageReportsByInstantaneousFlowAverageReportsId(instantaneousFlowAverageReportsId);
    }
}
